package StudyCode.summary.regularexpressionsmatch;

import java.util.regex.Pattern;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CheckWhetherTheInputStringMatchesTheRegex {
	public static void main(String[] argv) {
		String input = "www.tah1986.com";
		String regex = "www.tah1986.com";
		System.out.println("是否完全匹配? " + isMatching(input, regex));
	}

	public static boolean isMatching(String input, String regex) {
		return Pattern.compile(regex, Pattern.CANON_EQ).matcher(input)
				.matches();
	}
}
